package com.eshop.base.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.time.LocalDateTime;

/**
 * <p>
 * 快速查询用户默认地址
 * </p>
 *
 * @author raohj
 * @since 2025-05-13
 */
@Getter
@Setter
@ToString
@Accessors(chain = true)
@TableName("user_address")
@ApiModel(value = "UserAddress对象", description = "快速查询用户默认地址")
public class UserAddress implements Serializable {

    private static final long serialVersionUID = 1L;

    @TableId(value = "address_id", type = IdType.AUTO)
    private Long addressId;

    /**
     * 关联user.user_id
     */
    @TableField("user_id")
    @ApiModelProperty("关联user.user_id")
    private Long userId;

    /**
     * 收货人姓名
     */
    @TableField("consignee")
    @ApiModelProperty("收货人姓名")
    private String consignee;

    /**
     * 收货人手机号
     */
    @TableField("mobile")
    @ApiModelProperty("收货人手机号")
    private String mobile;

    /**
     * 省份
     */
    @ApiModelProperty("省份")
    @TableField("province")
    private String province;

    /**
     * 城市
     */
    @TableField("city")
    @ApiModelProperty("城市")
    private String city;

    /**
     * 区县
     */
    @ApiModelProperty("区县")
    @TableField("district")
    private String district;

    /**
     * 详细地址
     */
    @TableField("street")
    @ApiModelProperty("详细地址")
    private String street;

    /**
     * 邮编
     */
    @ApiModelProperty("邮编")
    @TableField("zip_code")
    private String zipCode;

    /**
     * 是否默认地址
     */
    @TableField("is_default")
    @ApiModelProperty("是否默认地址")
    private Boolean isDefault;

    @TableField("created_at")
    private LocalDateTime createdAt;

    @TableField("updated_at")
    private LocalDateTime updatedAt;
}
